package Resizers;

import org.eclipse.swt.graphics.*;

import Drawers.Drawer;
import Logs.Logger;
import SeamCarving.DynamicEnergyMap;
import Utils.Functions;

public class SeamResizer implements Resizer
{	
	public SeamResizer() {}
	
	public void Init(ImageData originalImage, Point maxSize) {}

	
	public Point CanResize(Point requestedSize) { return requestedSize; }
	
	public void Resize(ImageData orginalImage, Drawer drawer, Point trgSize)
	{
		drawer.Start(trgSize, Functions.ClearPalette());
		
		DynamicEnergyMap map = new DynamicEnergyMap(orginalImage); 
		
		map.makeSize(trgSize);
		
		map.draw(drawer, trgSize);
		drawer.Finish();
	}
	

	public void SetLogger(Logger log)
	{
		
	}
}